<?php
namespace app\admin\Model;

use think\Model;

class MajorModel extends Model{
    protected $name = 'major';
    public function school(){
        return $this->hasOne('School','id','school_id');
    }
}